<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>

	<script type="text/javascript">
		$.getScript('//connect.facebook.net/en_UK/all.js', function() {
			FB.init({
				appId : '1382865341999264',
				channelUrl : '//localhost:8080/',
				status : true,
				cookie : true,
				xfbml : true
			});
		});

		function logout() {
			FB.logout(function(response) {
			});
		};
	</script>

	<h1 id="logo">
		<a href="#{request.contextPath}/login.xhtml" title="#">AgendaClinica<span>.com</span></a>
	</h1>
	<hr class="noscreen" />

	<div id="navigation">
		<c:if test="#{userSession.loggedIn}">
			<h:form>
				<p:menubar styleClass="menubar" style="right: 0px;">
					<p:menuitem value="Agenda" action="agenda" />
					<p:menuitem value="Cadastro" action="listarConsultorio" />
					<p:menuitem value="Sair" action="#{loginBean.logout}"
						oncomplete="logout();" />
					<p:menuitem value="Trocar Senha" action="trocarSenha" />
				</p:menubar>
			</h:form>
		</c:if>
	</div>
	<hr class="noscreen" />

</ui:composition>
</html>